/**
 * Created by hewei on 2017-09-05.
 */
// include Tester
var Tester = require('../build/tester/tester');
var helper = Tester.helper ;
// include test data
var a      = require('./a.json');
var b      = require('./b.json');
var c      = {obj:{key:0,value:'hex',arr:[1,2,3,]}};
var t      = {e:1};
var d      = {x:{time:new Date()},max:''};
/*console.warn('test 1');
console.log(a);
console.log(helper.init(a,[b]));

console.warn('test 2');
console.log(a);
console.log(helper.init(a,[c]));

console.warn('test 3');
console.log(a);
console.log(helper.init(a,[t]));
console.warn('test 5');
console.log(a);
console.log(helper.init(a,[t]));
///////////////////////////////////
console.warn('test 6');
console.log(a,b);
console.log(helper.init(a,[b],helper.def.config_change_compare));
console.warn('test 7');
console.log(a,c);
console.log(helper.init(a,[c],helper.def.config_change_compare));

console.warn('test 8');
console.log(a,b);
console.log(helper.init(a,[b],helper.def.config_merge_replace));
console.warn('test 9');
console.log(a,c);
console.log(helper.init(a,[c],helper.def.config_merge_replace));*/
/*
console.log(a);
console.log(helper.init(a,[c]));

console.log(a);
console.log(helper.init(a,[t]));

console.log(a);
console.log(helper.init(a,[t]));*/

Tester.assert(a,Tester.test(helper.copy(a),[b],helper.init,{echo:true,args:helper.def.config_merge_append}));

Tester.assert(b,Tester.test(helper.copy(a) ,[b],helper.init,{echo:true,args:helper.def.config_merge_replace}));

Tester.assert(b,Tester.test(helper.copy(a) ,[t,d],helper.init,{echo:true,args:helper.def.config_merge_overwrite}));

Tester.assert(a,Tester.test(helper.copy(a) ,[t,d],helper.init,{echo:true,args:helper.def.config_merge_append}));

Tester.assert(a,Tester.test(helper.copy(a) ,[a],helper.init,{echo:true,args:helper.def.config_merge_append}));

Tester.assert(a,Tester.test(helper.copy(a) ,[t],helper.init,{echo:true,args:helper.def.config_merge_append}));